package org.firefly.fx.dao.impl;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.firefly.fx.bean.Product;
import org.firefly.fx.dao.ProductDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class ProductDaoImpl implements ProductDao{

	@Autowired
	private SqlSession sqlSession;
	
	@Override
	public List<Product> getAllProducts() {
		List<Product> products = sqlSession.selectList("productMapper.getAllProducts");
		return products;
	}
}
